package team119;

import battlecode.common.Direction;
import battlecode.common.MapLocation;

public class BOTInstanceVariables 
{
	public MapLocation[] recentLocations;
	boolean soliderSpawned = false;
	Direction hqLoc = Direction.NONE;
	Direction lastMoved = Direction.NONE;
	Direction moveDirection = Direction.NONE;
	Boolean isDefensiveRobot=false;
	boolean isCaptureBot = false;
	boolean isPlowBot = false;
	int roundsSinceMovementBest = 10;
	boolean isAttack = false;
	
	public BOTInstanceVariables()
	{
		recentLocations=new MapLocation[3];
	}
	
	public void AddLocation(MapLocation loc)
	{
		if(recentLocations[0]!=null)
				recentLocations[1]=recentLocations[0];
		if(recentLocations[1]!=null)
			recentLocations[2]=recentLocations[1];
		recentLocations[0]=loc;
	}
	
	public Boolean HasRecentLocation(MapLocation loc)
	{
		for(MapLocation locTest : recentLocations)
		{
			if(locTest!=null && locTest==loc)
				return true;
		}
		return false;
	}
	
}
